x86, hvm: Allow 100us periodic virtual timers
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 22 Oct 2008 11:08:16 +0000 (12:08 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 22 Oct 2008 11:08:16 +0000 (12:08 +0100)
Adjust vpt and hpet minimum period (for timers) from 900us to 100us to
be able to pass Windows 2008 compatibility tests.

Signed-off-by: Peter Johnston <peter.johnston@citrix.com>
xen/arch/x86/hvm/hpet.c
xen/arch/x86/hvm/vpt.c

index 2da14c6ee4b13b0ce44d672f309258bc90b5af97..42c5c58fab41dd2d7fcb6785440d5da188a287e4 100644 (file)
@@ -421,11 +421,11 @@ static int hpet_write(
         {
             /*
              * Clamp period to reasonable min/max values:
-             *  - minimum is 900us, same as timers controlled by vpt.c
+             *  - minimum is 100us, same as timers controlled by vpt.c
              *  - maximum is to prevent overflow in time_after() calculations
              */
-            if ( hpet_tick_to_ns(h, new_val) < MICROSECS(900) )
-                new_val = (MICROSECS(900) << 10) / h->hpet_to_ns_scale;
+            if ( hpet_tick_to_ns(h, new_val) < MICROSECS(100) )
+                new_val = (MICROSECS(100) << 10) / h->hpet_to_ns_scale;
             new_val &= (timer_is_32bit(h, tn) ? ~0u : ~0ull) >> 1;
             h->hpet.period[tn] = new_val;
         }
index 27bacd9b2842443bcdda47ba1a45721f7207b0f7..d9730bf14065666831021e237c0588a4a3d3f5cb 100644 (file)
@@ -368,13 +368,13 @@ void create_periodic_time(
     pt->do_not_freeze = 0;
     pt->irq_issued = 0;
 
-    /* Periodic timer must be at least 0.9ms. */
-    if ( (period < 900000) && period )
+    /* Periodic timer must be at least 0.1ms. */
+    if ( (period < 100000) && period )
     {
         if ( !test_and_set_bool(pt->warned_timeout_too_short) )
             gdprintk(XENLOG_WARNING, "HVM_PlatformTime: program too "
                      "small period %"PRIu64"\n", period);
-        period = 900000;
+        period = 100000;
     }
 
     pt->period = period;